package com.spring302;

import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

public class TaskService {


    @Scheduled(fixedRate = 3000)
    public void reportCurrentTime(){
        System.out.println("每隔3s上报一次时间："+new Date());
    }
}
